//
//  settingTableViewCell.m
//  one_mile_01
//
//  Created by 王进帅 on 15/8/24.
//  Copyright (c) 2015年 王雅蓉. All rights reserved.
//

#import "settingTableViewCell.h"

@implementation settingTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    
    if (self) {
        
        [self createSubView];
    }
    
    return self;
}
- (void)createSubView
{
    //    图片
    self.iconImageview = [[UIImageView alloc] init];
    if (iPhone6) {
        self.iconImageview.frame = CGRectMake(10, 10, 19, 19);
    }else{
        self.iconImageview.frame = CGRectMake(HEIGHT * 10 / 667, HEIGHT * 10 / 667, HEIGHT * 19 / 667, HEIGHT * 19 / 667);
    }
    [self.contentView addSubview:self.iconImageview];
    
    //    文字
    self.nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.nameLabel];
    if (iPhone6) {
        
        self.nameLabel.frame = CGRectMake(self.iconImageview.frame.origin.x + self.iconImageview.bounds.size.width + 10, self.contentView.bounds.size.height / 4, 200, self.contentView.frame.size.height / 2);
        self.nameLabel.font = [UIFont systemFontOfSize:16];
    }else{
        self.nameLabel.frame = CGRectMake(30 * HEIGHT / 667, self.contentView.bounds.size.height / 4 * HEIGHT / 667, 200 * WIDTH / 375, self.contentView.frame.size.height / 2 * HEIGHT / 667);
        self.nameLabel.font = [UIFont systemFontOfSize:HEIGHT * 16 / 667];
    }
    
    
    self.nameLabel.numberOfLines = 1;
    
}

@end
